Hi Michael and Paul, I've just verified the code again, and found that the yuicompressor can't handle the regular expression pattern "[^/]" correctly in my JDK configuration.
*OpenJDK Runtime Environment (build 1.6.0_0-b11) OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode) * The main problem might be that the compressor confused "/" as a functional command, especially "/^" and "$/" exist in the same pattern string. On possible solution is escape the "/" by using "[^\/]" instead. Although this is a small change, it might save tens of developers hours of investigating time. The patch has been attached. Many thanks! :D - Jacky On Mon, Jan 11, 2010 at 4:11 PM, Jacky Wang (JIRA) <j...@apache.org> wrote: > > [ > https://issues.apache.org/jira/browse/SHINDIG-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798614#action_12798614] > > Jacky Wang commented on SHINDIG-1203: > ------------------------------------- > > Hi Michael, > > Thanks for your reply. Actually it fixed my case. > > It seems like [^\/] is a more "correct" one than [^/]? If so, we'd better > put it into the repository. :) > > Thanks, > Jacky > > > Shindig cannot compile due to flash.js syntax error > > --------------------------------------------------- > > > > Key: SHINDIG-1203 > > URL: https://issues.apache.org/jira/browse/SHINDIG-1203 > > Project: Shindig > > Issue Type: Bug > > Components: Javascript > > Environment: Ubuntu 8.04.2, Maven 2.2.0, Java 1.6 > > Reporter: Michael Hermanto > > Priority: Minor > > Attachments: issue1203.diff > > > > > > Tried -- > > rm ~/.m2 > > mvn clean > > svn up > > mvn > > Build log -- > > [INFO] Installing /usr/local/google/mhermanto-shindig-03/shindig/pom.xml > to > /home/mhermanto/.m2/repository/org/apache/shindig/shindig-project/1.1-BETA4-incubating-SNAPSHOT/shindig-project-1.1-BETA4-incubating-SNAPSHOT.pom > > [INFO] > ------------------------------------------------------------------------ > > [INFO] Building Apache Shindig Features > > [INFO] task-segment: [install] > > [INFO] > ------------------------------------------------------------------------ > > [INFO] [enforcer:enforce {execution: enforce-java}] > > [INFO] [remote-resources:process {execution: default}] > > [INFO] [resources:resources {execution: default-resources}] > > [INFO] Using 'UTF-8' encoding to copy filtered resources. > > [INFO] Copying 1053 resources to features > > [INFO] Copying 1 resource to META-INF > > [INFO] Copying 4 resources > > [INFO] [yuicompressor:compress {execution: default}] > > .... > > [ERROR] .../target/classes/features/flash/flash.js:line 125:column > 51:missing ) after argument list > > opt_params.base = a.href.match(/^(.*\/)[^/]*$/)[1]; > > [ERROR] .../target/classes/features/flash/flash.js:line 1:column > 0:Compilation produced 1 syntax errors. > > [INFO] > ------------------------------------------------------------------------ > > [ERROR] FATAL ERROR > > [INFO] > ------------------------------------------------------------------------ > > [INFO] Compilation produced 1 syntax errors. > > [INFO] > ------------------------------------------------------------------------ > > [INFO] Trace > > org.mozilla.javascript.EvaluatorException: Compilation produced 1 syntax > errors. > > at > net.sf.alchim.mojo.yuicompressor.ErrorReporter4Mojo.runtimeError(ErrorReporter4Mojo.java:43) > > at org.mozilla.javascript.Parser.parse(Parser.java:391) > > at org.mozilla.javascript.Parser.parse(Parser.java:336) > > at > com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:312) > > at > com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:532) > > at > net.sf.alchim.mojo.yuicompressor.YuiCompressorMojo.processFile(YuiCompressorMojo.java:178) > > at > net.sf.alchim.mojo.yuicompressor.MojoSupport.processDir(MojoSupport.java:151) > > at > net.sf.alchim.mojo.yuicompressor.MojoSupport.execute(MojoSupport.java:103) > > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181) > > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) > > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137) > > at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) > > at > org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > > at java.lang.reflect.Method.invoke(Method.java:616) > > at > org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > > at > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > > [INFO] > ------------------------------------------------------------------------ > > [INFO] Total time: 9 seconds > > [INFO] Finished at: Tue Oct 20 23:20:04 PDT 2009 > > [INFO] Final Memory: 63M/317M > > [INFO] > ------------------------------------------------------------------------ > > -- > This message is automatically generated by JIRA. > - > You can reply to this email to add a comment to the issue online. > > -- Best Regards, Jacky Wang (Office) +86-10-6250-3316 (Mobile) +86-1381-0018-677 Kejian Building, Tsinghua Science Park Building 6 No.1 Zhongguancun East Road, Haidian District Beijing P.R.China 100084